import Vue from 'vue'
import App from './App.vue'
// Cookies插件
import VueCookies from 'vue-cookies'
// mavonEditor插件
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

Vue.use(VueCookies)
Vue.use(mavonEditor)

Vue.config.productionTip = false
import 'element-ui/lib/theme-chalk/index.css';

import {
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Pagination,
    Dialog,
    Input,
    Button,
    Menu,
    MenuItem,
    Tooltip,
    Radio,
    Tabs,
    TabPane,
    Select,
    Option,
    Table,
    TableColumn,
    DatePicker,
    Tag,
    Message,
    Switch,
    Drawer,
    Collapse,
    CollapseItem,
    Upload,
    MessageBox,
    Icon,
    RadioGroup,
    RadioButton
} from 'element-ui'

Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Pagination);
Vue.use(Input);
Vue.use(Button);
Vue.use(Menu);
Vue.use(MenuItem);
Vue.use(Tooltip);
Vue.use(Dialog);
Vue.use(Radio);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Select);
Vue.use(Option);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(DatePicker);
Vue.use(Tag);
Vue.use(Switch);
Vue.use(Drawer);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(Upload);
Vue.use(Icon);
Vue.use(RadioGroup);
Vue.use(RadioButton);

Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;

// 全局组件
import Carousel from '@/components/Carousel'
import ArticleSelector from '@/components/ArticleSelector'
import pagination from '@/components/Pagination'

// 注册全局组件
Vue.component(Carousel.name, Carousel)
Vue.component(ArticleSelector.name, ArticleSelector)
Vue.component(pagination.name, pagination)

import router from '@/router'
import store from '@/store'


new Vue({
    render: h => h(App),
    router,
    store
}).$mount('#app')
